function ph = ActionFun(params)

% covariance matrix C
[C,~] = CovMatriC(params);
% Cholesky Factorization
U = chol(C,'lower');

% 计算泽尼克多项式
ZM = ZernikeCal(params.j_max, params.N);
ZM = ZM(:,:,2:end); % 去掉piston项
% 构造K-L多项式
K_L = Zernike_to_K_L(U, ZM);

ph = zeros(params.N, params.N, params.Num);
for loop=1:params.Num
    
    ph_tmp = 0;
    A = randn(1, params.j_max-1);
    for i = 1:length(A)
        ph_tmp = ph_tmp + A(i)*K_L(:,:,i);
    end
    ph(:,:,loop) = ph_tmp; 
    
    fprintf('screen generation %3g / %3g \n', loop, params.Num);
end

% end of function
end